package com.gome.ocean.dao.model.datax;

import java.util.Date;

import com.gome.ocean.common.enums.job.JobExecuteType;

/**
 * @作者 liuqingxia
 * @创建时间 2016-01-20 12:07:44
 * @版本 1.00
 */
public class JobBO extends ScheduledJobTaskVO {

    private static final long serialVersionUID = 2462907349690990617L;

    /** 所属资源组，外键 */
    private Long              projectId;
    /** 执行脚本 */
    private String            executeName;
    /** job的配置信息 */
    private String            context;
    /** 执行id */
    private String            executeId;
    /** 实例状态，0-success，1-submit，2-init，3-run，4-fail，5-kill，255-unknown */
    private Integer           state;
    /** 提交的用户 */
    private String            submitUser;
    /** 提交时间 */
    private Date              submitTime;
    /** 实例提交的客户端ip */
    private String            submitIp;
    /** 开始执行时间 */
    private Date              startTime;
    /** 结束的用户 */
    private String            endUser;
    /** 表达式 */
    private String            cronExpression;
    /** 结束时间 */
    private Date              endTime;
    /** 备注信息 */
    private String            introduce;

    /** 执行类型 */
    private int               executeType;

    /**
     * 判断是否是Cron型的job
     * 
     * @return
     */
    public boolean isCronJob() {
        JobExecuteType jobExecuteType = JobExecuteType.getJobExecuteType(executeType);
        return jobExecuteType == JobExecuteType.CRON;
    }

    public int getExecuteType() {
        return executeType;
    }

    public void setExecuteType(int executeType) {
        this.executeType = executeType;
    }

    public String getIntroduce() {
        return introduce;
    }

    public void setIntroduce(String introduce) {
        this.introduce = introduce;
    }

    public Long getProjectId() {
        return this.projectId;
    }

    public void setProjectId(Long projectId) {
        this.projectId = projectId;
    }

    public String getExecuteName() {
        return this.executeName;
    }

    public void setExecuteName(String executeName) {
        this.executeName = executeName;
    }

    public String getContext() {
        return this.context;
    }

    public void setContext(String context) {
        this.context = context;
    }

    public String getExecuteId() {
        return this.executeId;
    }

    public void setExecuteId(String executeId) {
        this.executeId = executeId;
    }

    public Integer getState() {
        return this.state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Date getSubmitTime() {
        return submitTime;
    }

    public void setSubmitTime(Date submitTime) {
        this.submitTime = submitTime;
    }

    public String getSubmitIp() {
        return submitIp;
    }

    public void setSubmitIp(String submitIp) {
        this.submitIp = submitIp;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public String getEndUser() {
        return endUser;
    }

    public void setEndUser(String endUser) {
        this.endUser = endUser;
    }

    public String getCronExpression() {
        return cronExpression;
    }

    public void setCronExpression(String cronExpression) {
        this.cronExpression = cronExpression;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    
    public String getSubmitUser() {
        return submitUser;
    }

    
    public void setSubmitUser(String submitUser) {
        this.submitUser = submitUser;
    }
    
}
